package com.ruoyi.books.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 图书信息对象 books
 * 
 * @author anyunyi
 * @date 2025-05-28
 */
public class Books extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 图书ID */
    private Long id;

    /** ISBN编号 */
    @Excel(name = "ISBN编号")
    private String isbn;

    /** 书名 */
    @Excel(name = "书名")
    private String title;

    /** 作者 */
    @Excel(name = "作者")
    private String author;

    /** 出版社 */
    @Excel(name = "出版社")
    private String publisher;

    /** 出版年份 */
    @Excel(name = "出版年份")
    private String publishYear;

    /** 分类ID（关联categories表） */
    @Excel(name = "分类ID", readConverterExp = "关=联categories表")
    private Long categoryId;

    /** 封面图片URL */
    @Excel(name = "封面图片URL")
    private String coverUrl;

    /** 库存数量 */
    @Excel(name = "库存数量")
    private Long stock;

    /** 状态（1-在架，2-借出，3-损坏，4-预约中） */
    @Excel(name = "状态", readConverterExp = "1=-在架，2-借出，3-损坏，4-预约中")
    private Long status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setIsbn(String isbn) 
    {
        this.isbn = isbn;
    }

    public String getIsbn() 
    {
        return isbn;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setAuthor(String author) 
    {
        this.author = author;
    }

    public String getAuthor() 
    {
        return author;
    }
    public void setPublisher(String publisher) 
    {
        this.publisher = publisher;
    }

    public String getPublisher() 
    {
        return publisher;
    }
    public void setPublishYear(String publishYear) 
    {
        this.publishYear = publishYear;
    }

    public String getPublishYear() 
    {
        return publishYear;
    }
    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }
    public void setCoverUrl(String coverUrl) 
    {
        this.coverUrl = coverUrl;
    }

    public String getCoverUrl() 
    {
        return coverUrl;
    }
    public void setStock(Long stock) 
    {
        this.stock = stock;
    }

    public Long getStock() 
    {
        return stock;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("isbn", getIsbn())
            .append("title", getTitle())
            .append("author", getAuthor())
            .append("publisher", getPublisher())
            .append("publishYear", getPublishYear())
            .append("categoryId", getCategoryId())
            .append("coverUrl", getCoverUrl())
            .append("stock", getStock())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .toString();
    }
}
